<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{$page.post_title}</title>
    <meta name="keywords" content="{$site_info.site_seo_keywords|default=''}"/>
    <meta name="description" content="{$site_info.site_seo_description|default=''}">
    <include file="public@head"/>
    <script src="//api.map.baidu.com/api?v=1.3"></script>
    <style>
        img {
            max-width: none;
        }
    </style>
    <hook name="before_head_end"/>
</head>
<body class="body-white">
<include file="public@navTop"/>
<div style="background: url('{:cmf_get_image_url($page.more.thumbnail)}') center" class="banner-top">
</div>
<h1 class="page-title">{$page.post_title}</h1>
<div class="section slice no-padding" style="margin:auto;width: 90%;border:solid #cccc 2px">
    <div id="mapCanvas" class="map-canvas no-margin" style="height: 450px;">
        <php>
            $company_location=empty($theme_vars['company_location'])?'118.914347,42.249342':$theme_vars['company_location'];
            $company_location=explode(',',$company_location);
            $company_location_lng=$company_location[0];
            $company_location_lat=$company_location[1];
        </php>
        <script type="text/javascript">
            var map = new BMap.Map("mapCanvas"); // 创建Map实例
            var point = new BMap.Point("{$company_location_lng}", "{$company_location_lat}"); // 创建点坐标
            map.centerAndZoom(point, 15); // 初始化地图,设置中心点坐标和地图级别。
            //map.enableScrollWheelZoom(); //启用滚轮放大缩小
            //添加缩放控件
            map.addControl(new BMap.NavigationControl());
            map.addControl(new BMap.ScaleControl());
            map.addControl(new BMap.OverviewMapControl());

            var marker = new BMap.Marker(point); // 创建标注
            map.addOverlay(marker); // 将标注添加到地图中
            var infoWindow = new BMap.InfoWindow("{$theme_vars.baidu_map_info_window_text|htmlspecialchars_decode|default=''}"); // 创建信息窗口对象
            marker.openInfoWindow(infoWindow);
        </script>
    </div>
</div>
<div class="container" style="margin:100px auto;">
    <div class="row">
        <div class="col-md-12">
            {$page.post_content}
        </div>
    </div>
</div>
<include file="public@footer"/>
<style>
    .footer {
        display: block;
        animation-name: footerInAn;
        position: relative;
    }

    .footer-link {
        height: 40px;
    }

    .footer-link .code-img {
        bottom: 0;
    }

    #topNav {
        animation-name: topNavInAn;
    }

</style>
<include file="public@scripts"/>
<script>
    $(function () {
        $("body").mousemove(function (e) {
            $("#footer").css("animation-name", "footerInAn")
        })
        $("body").mouseleave(function (e) {
            $("#footer").css("animation-name", "footerOutAn")
        })
    })
</script>
<hook name="before_body_end"/>
</body>
</html>